Drawing commands can only be used in HMI "custom" object.

How to add object: 
1. New build HMI and save.
2. Add HMI to the project.
3. In the HMI interface, select "Tool Box" - "Custom"
4. Double-click the generated custom object, to modify the height and width of the control.
5. Refresh sub and draw sub are created by basic files, note that the function must be global type

This Program: draw the line by mouse clicking -- draw the line by 2 points